﻿@page
@{ Layout = "_Layout"; }

<div style="height: 10px"></div>
<el-form v-on:submit.native.prevent size="small" ref="form" :model="form" label-width="200px">
  <el-form-item label="编辑器外部图片">
    <el-radio-group v-model="form.isSaveImageInTextEditor">
      <el-radio :label="true">自动保存外部图片</el-radio>
      <el-radio :label="false">不保存</el-radio>
    </el-radio-group>
    <div class="tips">自动保存外部图片功能将把编辑器内的外部图片保存为站点图片</div>
  </el-form-item>

  <el-form-item label="每页显示内容数" prop="pageSize" :rules="[
    { required: true, message: '请输入每页显示内容数' },
    { validator: utils.validateInt }
  ]">
    <el-input v-model.number="form.pageSize" style="width: 120px" placeholder="请输入每页显示内容数"></el-input>
    <span class="tips">(篇/页)</span>
    <div class="tips">在此设置后台每页显示的内容数</div>
  </el-form-item>

  <el-form-item label="内容排序规则">
    <el-select v-model="form.taxisType" placeholder="请选择内容排序规则">
      <el-option v-for="taxisType in taxisTypes" :key="taxisType.value" :label="taxisType.label" :value="taxisType.value"></el-option>
    </el-select>
    <div class="tips">设置后当前站点内容在后台将一直按照此排序规则显示</div>
  </el-form-item>

  <el-form-item label="内容编辑器分页方式">
    <el-radio-group v-model="form.isAutoPageInTextEditor">
      <el-radio :label="true">按指定字数自动分页</el-radio>
      <el-radio :label="false">手动插入分页符分页</el-radio>
    </el-radio-group>
    <div class="tips">建议手动插入分页符分页，修改此项需要重新生成内容页面</div>
  </el-form-item>
  <el-form-item v-if="form.isAutoPageInTextEditor" label="内容自动分页每页字数" prop="autoPageWordNum" :rules="[
    { required: true, message: '请输入内容自动分页每页字数' },
    { validator: utils.validateInt }
  ]">
    <el-input v-model.number="form.autoPageWordNum" style="width: 120px" placeholder="请输入内容自动分页每页字数"></el-input>
    <span class="tips">(字/页)</span>
    <div class="tips">在此设置内容自动分页的每页字数，修改此项需要重新生成内容页面</div>
  </el-form-item>
  <el-form-item label="标题双空格换行">
    <el-radio-group v-model="form.isContentTitleBreakLine">
      <el-radio :label="true">启用标题双空格换行</el-radio>
      <el-radio :label="false">不启用</el-radio>
    </el-radio-group>
    <div class="tips">标题字段输入两连续的英文空格，内容页中标题将自动换行，列表页将忽略此空格</div>
  </el-form-item>
  <el-form-item label="副标题双空格换行">
    <el-radio-group v-model="form.isContentSubTitleBreakLine">
      <el-radio :label="true">启用副标题双空格换行</el-radio>
      <el-radio :label="false">不启用</el-radio>
    </el-radio-group>
    <div class="tips">副标题字段输入两连续的英文空格，内容页中副标题将自动换行，列表页将忽略此空格</div>
  </el-form-item>
  <el-form-item label="内容审核机制" prop="checkContentLevel" :rules="{ required: true, message: '请选择内容审核机制' }">
    <el-select v-model="form.checkContentLevel" placeholder="请选择内容审核机制">
        <el-option :value="1" label="一级"></el-option>
        <el-option :value="2" label="二级"></el-option>
        <el-option :value="3" label="三级"></el-option>
        <el-option :value="4" label="四级"></el-option>
        <el-option :value="5" label="五级"></el-option>
    </el-select>
    <div class="tips">内容在添加后需要经多少次审核才能正式发布</div>
  </el-form-item>
  <el-form-item label="默认审核状态" prop="checkContentDefaultLevel" :rules="{ required: true, message: '请选择默认审核状态' }">
    <el-select v-if="form.checkContentLevel == 1" v-model="form.checkContentDefaultLevel" placeholder="请选择默认审核状态">
      <el-option :value="-99" label="草稿"></el-option>
      <el-option :value="0" label="待审核"></el-option>
      <el-option :value="1" label="已审核"></el-option>
    </el-select>
    <el-select v-if="form.checkContentLevel == 2" v-model="form.checkContentDefaultLevel" placeholder="请选择默认审核状态">
      <el-option :value="-99" label="草稿"></el-option>
      <el-option :value="0" label="待审核"></el-option>
      <el-option :value="1" label="初审通过，等待终审"></el-option>
      <el-option :value="2" label="已审核"></el-option>
    </el-select>
    <el-select v-if="form.checkContentLevel == 3" v-model="form.checkContentDefaultLevel" placeholder="请选择默认审核状态">
      <el-option :value="-99" label="草稿"></el-option>
      <el-option :value="0" label="待审核"></el-option>
      <el-option :value="1" label="初审通过，等待二审"></el-option>
      <el-option :value="2" label="二审通过，等待终审"></el-option>
      <el-option :value="3" label="已审核"></el-option>
    </el-select>
    <el-select v-if="form.checkContentLevel == 4" v-model="form.checkContentDefaultLevel" placeholder="请选择默认审核状态">
      <el-option :value="-99" label="草稿"></el-option>
      <el-option :value="0" label="待审核"></el-option>
      <el-option :value="1" label="初审通过，等待二审"></el-option>
      <el-option :value="2" label="二审通过，等待三审"></el-option>
      <el-option :value="3" label="三审通过，等待终审"></el-option>
      <el-option :value="4" label="已审核"></el-option>
    </el-select>
    <el-select v-if="form.checkContentLevel == 5" v-model="form.checkContentDefaultLevel" placeholder="请选择默认审核状态">
      <el-option :value="-99" label="草稿"></el-option>
      <el-option :value="0" label="待审核"></el-option>
      <el-option :value="1" label="初审通过，等待二审"></el-option>
      <el-option :value="2" label="二审通过，等待三审"></el-option>
      <el-option :value="3" label="三审通过，等待四审"></el-option>
      <el-option :value="4" label="四审通过，等待终审"></el-option>
      <el-option :value="5" label="已审核"></el-option>
    </el-select>
    <div class="tips">在此设置内容的默认审核状态</div>
  </el-form-item>

  <el-divider></el-divider>
  <div style="height: 10px"></div>
  <el-form-item>
    <el-button type="primary" v-on:click="btnSubmitClick" size="small">确 定</el-button>
  </el-form-item>
</el-form>

@section Scripts{
<script src="/sitefiles/assets/js/admin/cms/settingsContent.js" type="text/javascript"></script> }